/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.hotel.test.service.persistence;

import com.hotel.test.model.Hotel;

import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil;
import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.ReferenceRegistry;
import com.liferay.portal.service.ServiceContext;

import java.util.List;

/**
 * The persistence utility for the hotel service. This utility wraps {@link HotelPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
 *
 * <p>
 * Caching information and settings can be found in <code>portal.properties</code>
 * </p>
 *
 * @author Vien-IT
 * @see HotelPersistence
 * @see HotelPersistenceImpl
 * @generated
 */
public class HotelUtil {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never modify this class directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
	 */

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
	 */
	public static void clearCache() {
		getPersistence().clearCache();
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
	 */
	public static void clearCache(Hotel hotel) {
		getPersistence().clearCache(hotel);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
	 */
	public long countWithDynamicQuery(DynamicQuery dynamicQuery)
		throws SystemException {
		return getPersistence().countWithDynamicQuery(dynamicQuery);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
	 */
	public static List<Hotel> findWithDynamicQuery(DynamicQuery dynamicQuery)
		throws SystemException {
		return getPersistence().findWithDynamicQuery(dynamicQuery);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
	 */
	public static List<Hotel> findWithDynamicQuery(DynamicQuery dynamicQuery,
		int start, int end) throws SystemException {
		return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
	 */
	public static List<Hotel> findWithDynamicQuery(DynamicQuery dynamicQuery,
		int start, int end, OrderByComparator orderByComparator)
		throws SystemException {
		return getPersistence()
				   .findWithDynamicQuery(dynamicQuery, start, end,
			orderByComparator);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
	 */
	public static Hotel update(Hotel hotel, boolean merge)
		throws SystemException {
		return getPersistence().update(hotel, merge);
	}

	/**
	 * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean, ServiceContext)
	 */
	public static Hotel update(Hotel hotel, boolean merge,
		ServiceContext serviceContext) throws SystemException {
		return getPersistence().update(hotel, merge, serviceContext);
	}

	/**
	* Caches the hotel in the entity cache if it is enabled.
	*
	* @param hotel the hotel
	*/
	public static void cacheResult(com.hotel.test.model.Hotel hotel) {
		getPersistence().cacheResult(hotel);
	}

	/**
	* Caches the hotels in the entity cache if it is enabled.
	*
	* @param hotels the hotels
	*/
	public static void cacheResult(
		java.util.List<com.hotel.test.model.Hotel> hotels) {
		getPersistence().cacheResult(hotels);
	}

	/**
	* Creates a new hotel with the primary key. Does not add the hotel to the database.
	*
	* @param hotelId the primary key for the new hotel
	* @return the new hotel
	*/
	public static com.hotel.test.model.Hotel create(long hotelId) {
		return getPersistence().create(hotelId);
	}

	/**
	* Removes the hotel with the primary key from the database. Also notifies the appropriate model listeners.
	*
	* @param hotelId the primary key of the hotel
	* @return the hotel that was removed
	* @throws com.hotel.test.NoSuchHotelException if a hotel with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hotel.test.model.Hotel remove(long hotelId)
		throws com.hotel.test.NoSuchHotelException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().remove(hotelId);
	}

	public static com.hotel.test.model.Hotel updateImpl(
		com.hotel.test.model.Hotel hotel, boolean merge)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().updateImpl(hotel, merge);
	}

	/**
	* Returns the hotel with the primary key or throws a {@link com.hotel.test.NoSuchHotelException} if it could not be found.
	*
	* @param hotelId the primary key of the hotel
	* @return the hotel
	* @throws com.hotel.test.NoSuchHotelException if a hotel with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hotel.test.model.Hotel findByPrimaryKey(long hotelId)
		throws com.hotel.test.NoSuchHotelException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByPrimaryKey(hotelId);
	}

	/**
	* Returns the hotel with the primary key or returns <code>null</code> if it could not be found.
	*
	* @param hotelId the primary key of the hotel
	* @return the hotel, or <code>null</code> if a hotel with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hotel.test.model.Hotel fetchByPrimaryKey(long hotelId)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().fetchByPrimaryKey(hotelId);
	}

	/**
	* Returns all the hotels where hotelName = &#63;.
	*
	* @param hotelName the hotel name
	* @return the matching hotels
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hotel.test.model.Hotel> findByHotelName(
		java.lang.String hotelName)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByHotelName(hotelName);
	}

	/**
	* Returns a range of all the hotels where hotelName = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param hotelName the hotel name
	* @param start the lower bound of the range of hotels
	* @param end the upper bound of the range of hotels (not inclusive)
	* @return the range of matching hotels
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hotel.test.model.Hotel> findByHotelName(
		java.lang.String hotelName, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findByHotelName(hotelName, start, end);
	}

	/**
	* Returns an ordered range of all the hotels where hotelName = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param hotelName the hotel name
	* @param start the lower bound of the range of hotels
	* @param end the upper bound of the range of hotels (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of matching hotels
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hotel.test.model.Hotel> findByHotelName(
		java.lang.String hotelName, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByHotelName(hotelName, start, end, orderByComparator);
	}

	/**
	* Returns the first hotel in the ordered set where hotelName = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param hotelName the hotel name
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching hotel
	* @throws com.hotel.test.NoSuchHotelException if a matching hotel could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hotel.test.model.Hotel findByHotelName_First(
		java.lang.String hotelName,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.hotel.test.NoSuchHotelException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByHotelName_First(hotelName, orderByComparator);
	}

	/**
	* Returns the last hotel in the ordered set where hotelName = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param hotelName the hotel name
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching hotel
	* @throws com.hotel.test.NoSuchHotelException if a matching hotel could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hotel.test.model.Hotel findByHotelName_Last(
		java.lang.String hotelName,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.hotel.test.NoSuchHotelException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByHotelName_Last(hotelName, orderByComparator);
	}

	/**
	* Returns the hotels before and after the current hotel in the ordered set where hotelName = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param hotelId the primary key of the current hotel
	* @param hotelName the hotel name
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the previous, current, and next hotel
	* @throws com.hotel.test.NoSuchHotelException if a hotel with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public static com.hotel.test.model.Hotel[] findByHotelName_PrevAndNext(
		long hotelId, java.lang.String hotelName,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.hotel.test.NoSuchHotelException,
			com.liferay.portal.kernel.exception.SystemException {
		return getPersistence()
				   .findByHotelName_PrevAndNext(hotelId, hotelName,
			orderByComparator);
	}

	/**
	* Returns all the hotels.
	*
	* @return the hotels
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hotel.test.model.Hotel> findAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findAll();
	}

	/**
	* Returns a range of all the hotels.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of hotels
	* @param end the upper bound of the range of hotels (not inclusive)
	* @return the range of hotels
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hotel.test.model.Hotel> findAll(
		int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findAll(start, end);
	}

	/**
	* Returns an ordered range of all the hotels.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of hotels
	* @param end the upper bound of the range of hotels (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of hotels
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hotel.test.model.Hotel> findAll(
		int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().findAll(start, end, orderByComparator);
	}

	/**
	* Removes all the hotels where hotelName = &#63; from the database.
	*
	* @param hotelName the hotel name
	* @throws SystemException if a system exception occurred
	*/
	public static void removeByHotelName(java.lang.String hotelName)
		throws com.liferay.portal.kernel.exception.SystemException {
		getPersistence().removeByHotelName(hotelName);
	}

	/**
	* Removes all the hotels from the database.
	*
	* @throws SystemException if a system exception occurred
	*/
	public static void removeAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		getPersistence().removeAll();
	}

	/**
	* Returns the number of hotels where hotelName = &#63;.
	*
	* @param hotelName the hotel name
	* @return the number of matching hotels
	* @throws SystemException if a system exception occurred
	*/
	public static int countByHotelName(java.lang.String hotelName)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countByHotelName(hotelName);
	}

	/**
	* Returns the number of hotels.
	*
	* @return the number of hotels
	* @throws SystemException if a system exception occurred
	*/
	public static int countAll()
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().countAll();
	}

	/**
	* Returns all the rom types associated with the hotel.
	*
	* @param pk the primary key of the hotel
	* @return the rom types associated with the hotel
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hotel.test.model.RomType> getRomTypes(
		long pk) throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().getRomTypes(pk);
	}

	/**
	* Returns a range of all the rom types associated with the hotel.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param pk the primary key of the hotel
	* @param start the lower bound of the range of hotels
	* @param end the upper bound of the range of hotels (not inclusive)
	* @return the range of rom types associated with the hotel
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hotel.test.model.RomType> getRomTypes(
		long pk, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().getRomTypes(pk, start, end);
	}

	/**
	* Returns an ordered range of all the rom types associated with the hotel.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param pk the primary key of the hotel
	* @param start the lower bound of the range of hotels
	* @param end the upper bound of the range of hotels (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of rom types associated with the hotel
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hotel.test.model.RomType> getRomTypes(
		long pk, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().getRomTypes(pk, start, end, orderByComparator);
	}

	/**
	* Returns the number of rom types associated with the hotel.
	*
	* @param pk the primary key of the hotel
	* @return the number of rom types associated with the hotel
	* @throws SystemException if a system exception occurred
	*/
	public static int getRomTypesSize(long pk)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().getRomTypesSize(pk);
	}

	/**
	* Returns <code>true</code> if the rom type is associated with the hotel.
	*
	* @param pk the primary key of the hotel
	* @param romTypePK the primary key of the rom type
	* @return <code>true</code> if the rom type is associated with the hotel; <code>false</code> otherwise
	* @throws SystemException if a system exception occurred
	*/
	public static boolean containsRomType(long pk, long romTypePK)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().containsRomType(pk, romTypePK);
	}

	/**
	* Returns <code>true</code> if the hotel has any rom types associated with it.
	*
	* @param pk the primary key of the hotel to check for associations with rom types
	* @return <code>true</code> if the hotel has any rom types associated with it; <code>false</code> otherwise
	* @throws SystemException if a system exception occurred
	*/
	public static boolean containsRomTypes(long pk)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().containsRomTypes(pk);
	}

	/**
	* Returns all the tbl comments associated with the hotel.
	*
	* @param pk the primary key of the hotel
	* @return the tbl comments associated with the hotel
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hotel.test.model.TblComment> getTblComments(
		long pk) throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().getTblComments(pk);
	}

	/**
	* Returns a range of all the tbl comments associated with the hotel.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param pk the primary key of the hotel
	* @param start the lower bound of the range of hotels
	* @param end the upper bound of the range of hotels (not inclusive)
	* @return the range of tbl comments associated with the hotel
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hotel.test.model.TblComment> getTblComments(
		long pk, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().getTblComments(pk, start, end);
	}

	/**
	* Returns an ordered range of all the tbl comments associated with the hotel.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param pk the primary key of the hotel
	* @param start the lower bound of the range of hotels
	* @param end the upper bound of the range of hotels (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of tbl comments associated with the hotel
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hotel.test.model.TblComment> getTblComments(
		long pk, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().getTblComments(pk, start, end, orderByComparator);
	}

	/**
	* Returns the number of tbl comments associated with the hotel.
	*
	* @param pk the primary key of the hotel
	* @return the number of tbl comments associated with the hotel
	* @throws SystemException if a system exception occurred
	*/
	public static int getTblCommentsSize(long pk)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().getTblCommentsSize(pk);
	}

	/**
	* Returns <code>true</code> if the tbl comment is associated with the hotel.
	*
	* @param pk the primary key of the hotel
	* @param tblCommentPK the primary key of the tbl comment
	* @return <code>true</code> if the tbl comment is associated with the hotel; <code>false</code> otherwise
	* @throws SystemException if a system exception occurred
	*/
	public static boolean containsTblComment(long pk, long tblCommentPK)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().containsTblComment(pk, tblCommentPK);
	}

	/**
	* Returns <code>true</code> if the hotel has any tbl comments associated with it.
	*
	* @param pk the primary key of the hotel to check for associations with tbl comments
	* @return <code>true</code> if the hotel has any tbl comments associated with it; <code>false</code> otherwise
	* @throws SystemException if a system exception occurred
	*/
	public static boolean containsTblComments(long pk)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().containsTblComments(pk);
	}

	/**
	* Returns all the bookings associated with the hotel.
	*
	* @param pk the primary key of the hotel
	* @return the bookings associated with the hotel
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hotel.test.model.Booking> getBookings(
		long pk) throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().getBookings(pk);
	}

	/**
	* Returns a range of all the bookings associated with the hotel.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param pk the primary key of the hotel
	* @param start the lower bound of the range of hotels
	* @param end the upper bound of the range of hotels (not inclusive)
	* @return the range of bookings associated with the hotel
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hotel.test.model.Booking> getBookings(
		long pk, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().getBookings(pk, start, end);
	}

	/**
	* Returns an ordered range of all the bookings associated with the hotel.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param pk the primary key of the hotel
	* @param start the lower bound of the range of hotels
	* @param end the upper bound of the range of hotels (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of bookings associated with the hotel
	* @throws SystemException if a system exception occurred
	*/
	public static java.util.List<com.hotel.test.model.Booking> getBookings(
		long pk, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().getBookings(pk, start, end, orderByComparator);
	}

	/**
	* Returns the number of bookings associated with the hotel.
	*
	* @param pk the primary key of the hotel
	* @return the number of bookings associated with the hotel
	* @throws SystemException if a system exception occurred
	*/
	public static int getBookingsSize(long pk)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().getBookingsSize(pk);
	}

	/**
	* Returns <code>true</code> if the booking is associated with the hotel.
	*
	* @param pk the primary key of the hotel
	* @param bookingPK the primary key of the booking
	* @return <code>true</code> if the booking is associated with the hotel; <code>false</code> otherwise
	* @throws SystemException if a system exception occurred
	*/
	public static boolean containsBooking(long pk, long bookingPK)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().containsBooking(pk, bookingPK);
	}

	/**
	* Returns <code>true</code> if the hotel has any bookings associated with it.
	*
	* @param pk the primary key of the hotel to check for associations with bookings
	* @return <code>true</code> if the hotel has any bookings associated with it; <code>false</code> otherwise
	* @throws SystemException if a system exception occurred
	*/
	public static boolean containsBookings(long pk)
		throws com.liferay.portal.kernel.exception.SystemException {
		return getPersistence().containsBookings(pk);
	}

	public static HotelPersistence getPersistence() {
		if (_persistence == null) {
			_persistence = (HotelPersistence)PortletBeanLocatorUtil.locate(com.hotel.test.service.ClpSerializer.getServletContextName(),
					HotelPersistence.class.getName());

			ReferenceRegistry.registerReference(HotelUtil.class, "_persistence");
		}

		return _persistence;
	}

	public void setPersistence(HotelPersistence persistence) {
		_persistence = persistence;

		ReferenceRegistry.registerReference(HotelUtil.class, "_persistence");
	}

	private static HotelPersistence _persistence;
}